C # hosting and unmanaged resources,
Reprinted from: http://blog.jobbole.com/89064/
Managed resources refer to. NET resources that can be automatically recycled, mainly the memory resources allocated on the managed stack. The collection of managed
Understanding of managed and unmanaged resources, hosting of managed resources
In the. net programming environment, system resources are divided into managed resources and unmanaged resources.
For the collection of managed resources, manual
[Switch] the difference between using managed and unmanaged resources in C # And how to manually release unmanaged resources :,
Managed resources refer to. NET resources that can be automatically recycled, mainly the memory resources allocated on
Implementing your more important algorithm in an unmanaged module and then interoperating with the CLR's platform to make the managed code call it so that the program still works, but it is difficult to decompile the unmanaged native code.The most
A managed resource refers to a. NET a resource that can be reclaimed automatically, mainly refers to the memory resources allocated on the managed heap. The collection of managed resources does not require human intervention, and the. NET runtime
1. Compile the source code into managed code1. CLR (Common Language Runtime) is a "RunTime" that can be used by multiple languages. Core CLR functions (such as memory management, assembly loading, and security, exception Handling and thread
ManagedCode(Managed code ): Code executed by the Common Language Runtime Library environment (rather than directly by the operating system. Managed code application
Program You can obtain the Common Language Runtime library service, such as
Recently, it is often seen that some people ask about hosting an unmanaged instance.DLLCall problems. Calling a dynamic library is actually very simple. ManyCodeAll are implementedDLL. I mainly talk about dynamic library loading.
It is easy to
Since C # is writing managed code, it is compiled to generate a Microsoft intermediate language, c ++ code is compiled to generate local machine code (such C ++ is also called local C ++ or unmanaged C ++, vc6.0 is a platform for developing
Series of articles on interoperability :. NET (1: Introduction ). NET (2: Faster first ). NET (3: The DllImport feature of basic knowledge ). NET (4: Basic knowledge-based Dispose unmanaged memory ). NET (5: Basic knowledge-based Dynamic platform
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.